<?php
if(count($this->userProfile) && isset($this->userProfile['id'])) {
    ?>
    <div id="userPanel">
    	<strong><?php echo $this->userProfile['fullname']; ?></strong>
    	<span class="class1"><a href="<?php echo $this->url(array('module' => 'user', 'controller' => 'account', 'action' => 'profile'), 'default', true); ?>">Trang cá nhân</a></span>
    	<span class="class2"><a href="<?php echo $this->url(array('module' => 'user', 'controller' => 'auth', 'action' => 'logout'), 'default', true); ?>">Thoát ra</a></span>
    </div>
    <?php
}
else {
    ?>
    <form id="dangnhap" name="dangnhap" method="post" action="<?php echo $this->url(array('module' => 'user', 'controller' => 'auth', 'action' => 'login'), 'default', true); ?>">
    	<?php echo $this->form->getElement('email')->render(); ?>
    	<?php echo $this->form->getElement('password')->render(); ?>
    	<input type="image" src="<?php echo $this->themePath; ?>/img//btn_login.gif" name="submit" id="submit" value="Đăng nhập" />
    	<div class="help">
    		<p><a href="<?php echo $this->url(array('module' => 'user', 'controller' => 'account', 'action' => 'forgot-password'), 'default', true); ?>">Quên mật khẩu</a></p>
    		<p><a href="<?php echo $this->url(array('module' => 'user', 'controller' => 'register', 'action' => 'index'), 'default', true); ?>">Đăng ký</a></p>
    	</div>
    	<?php echo $this->form->getElement('csrf_token')->render() ?>
    </form>
    <?php
}
?>